
count <- 2

repeat {
  print("repeat count")
  print(count)
  count <- count + 1
  if (count > 5) {
    break
  }
}

flag <- TRUE
sum <- 1
while(flag) {
  print("while circle")
  print(sum)
  sum <- sum + 1
  if (sum > 5) {
    flag <- FALSE
  }
}

v <- LETTERS[1:6]
for (i in v) {
  print(i) # 输出前六个字母
}

v <- LETTERS[1:6]
for (i in v) {
  if (i == "B") {
    next # 跳出此次循环
  }
  print(i)
}